package edu.smxy.associationmanagement.services.association.impl;

import edu.smxy.associationmanagement.domain.Association;
import edu.smxy.associationmanagement.mapper.AssociationMapper;
import edu.smxy.associationmanagement.services.association.AssociationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * Association服务层接口实现
 *
 * @date 2019/04/18
 * @author: : SDH
 * @description: Association服务层接口实现
 */
@Service("AssociationService")
public class AssociationServiceImpl implements AssociationService {
  @Autowired AssociationMapper associationMapper;
  /**
   * 根据id删除Association数据
   *
   * @param associationid id
   * @return 数据库受影响的行数
   */
  @Override
  public int deleteByPrimaryKey(final Integer associationid) {
    return this.associationMapper.deleteByPrimaryKey(associationid);
  }
  /**
   * 插入Association数据
   *
   * @param record Association对象
   * @return 数据库受影响的行数
   */
  @Override
  public int insert(final Association record) {
    return this.associationMapper.insert(record);
  }
  /**
   * 安全插入Association数据
   *
   * @param record Association对象
   * @return 数据库受影响的行数
   */
  @Override
  public int insertSelective(final Association record) {
    return this.associationMapper.insertSelective(record);
  }
  /**
   * 根据id查询Association数据
   *
   * @param associationid id
   * @return 查询到的Association对象
   */
  @Override
  public Association selectByPrimaryKey(final Integer associationid) {
    return this.associationMapper.selectByPrimaryKey(associationid);
  }
  /**
   * 安全更新Association数据
   *
   * @param record Association对象
   * @return 受影响的行数
   */
  @Override
  public int updateByPrimaryKeySelective(final Association record) {
    return this.associationMapper.updateByPrimaryKeySelective(record);
  }
  /**
   * 更新Association数据
   *
   * @param record Association对象
   * @return 数据库受影响的行数
   */
  @Override
  public int updateByPrimaryKey(final Association record) {
    return this.associationMapper.updateByPrimaryKey(record);
  }
  /**
   * 获取所有Association数据
   *
   * @return List<Association> Association集合
   */
  @Override
  public List<Association> getAll() {
    return this.associationMapper.getAll();
  }
  /**
   * 根据Association对象查询是否存在这一数据
   *
   * @param association Association对象
   * @return 查询到的Association对象
   */
  @Override
  public Association query(final Association association) {
    return this.associationMapper.query(association);
  }
}
